﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using HisoftSmart.Client.AutomationClient;
using System.Windows.Threading;
using HisoftSmart.Client.AutomationClient.UIAutomationServiceReference;

namespace HisoftSmart.Client.AutomationClient
{
    public class Configuration : IConfiguration
    {
        public const string DefaultRemoteUrl = "http://localhost:21280/UIAutomationService.svc";
        public static readonly TimeSpan DefaultTestRemoteTimeout = TimeSpan.FromSeconds(1.0);

        public string RemoteUrl { get; set; }
        public Dispatcher UiDispatcher { get; set; }

        public Configuration()
        {
            RemoteUrl = DefaultRemoteUrl;
            
        }

        private Uri RemoteUri
        {
            get
            {
                return new Uri(RemoteUrl);
            }
        }

        private Uri RootRemoteUri
        {
            get
            {
                return new Uri(RemoteUri, "/");
            }
        }

        public UIAutomationServiceClient CreateClient()
        {
            return new UIAutomationServiceClient();
        }
    }
}
